Optimal. Leaf size=53 \[ \frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {2498, 272, 45}
\begin {gather*} -\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right )+\frac {a p \sqrt {x}}{b}-\frac {p x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rule 2498
Rubi steps
\begin {align*} \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx &=x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-\frac {1}{2} (b p) \int \frac {\sqrt {x}}{a+b \sqrt {x}} \, dx\\ &=x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-(b p) \text {Subst}\left (\int \frac {x^2}{a+b x} \, dx,x,\sqrt {x}\right )\\ &=x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-(b p) \text {Subst}\left (\int \left (-\frac {a}{b^2}+\frac {x}{b}+\frac {a^2}{b^2 (a+b x)}\right ) \, dx,x,\sqrt {x}\right )\\ &=\frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 53, normalized size = 1.00 \begin {gather*} \frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.28, size = 52, normalized size = 0.98
method | result | size |
default | \(x \ln \left (c \left (a +b \sqrt {x}\right )^{p}\right )-\frac {p b \left (-\frac {2 \left (-\frac {b x}{2}+a \sqrt {x}\right )}{b^{2}}+\frac {2 a^{2} \ln \left (a +b \sqrt {x}\right )}{b^{3}}\right )}{2}\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 50, normalized size = 0.94 \begin {gather*} -\frac {1}{2} \, b p {\left (\frac {2 \, a^{2} \log \left (b \sqrt {x} + a\right )}{b^{3}} + \frac {b x - 2 \, a \sqrt {x}}{b^{2}}\right )} + x \log \left ({\left (b \sqrt {x} + a\right )}^{p} c\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 51, normalized size = 0.96 \begin {gather*} -\frac {b^{2} p x - 2 \, b^{2} x \log \left (c\right ) - 2 \, a b p \sqrt {x} - 2 \, {\left (b^{2} p x - a^{2} p\right )} \log \left (b \sqrt {x} + a\right )}{2 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.75, size = 61, normalized size = 1.15 \begin {gather*} - \frac {b p \left (\frac {2 a^{2} \left (\begin {cases} \frac {\sqrt {x}}{a} & \text {for}\: b = 0 \\\frac {\log {\left (a + b \sqrt {x} \right )}}{b} & \text {otherwise} \end {cases}\right )}{b^{2}} - \frac {2 a \sqrt {x}}{b^{2}} + \frac {x}{b}\right )}{2} + x \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 97 vs.
\(2 (45) = 90\).
time = 4.46, size = 97, normalized size = 1.83 \begin {gather*} \frac {\frac {{\left (2 \, {\left (b \sqrt {x} + a\right )}^{2} \log \left (b \sqrt {x} + a\right ) - 4 \, {\left (b \sqrt {x} + a\right )} a \log \left (b \sqrt {x} + a\right ) - {\left (b \sqrt {x} + a\right )}^{2} + 4 \, {\left (b \sqrt {x} + a\right )} a\right )} p}{b} + \frac {2 \, {\left ({\left (b \sqrt {x} + a\right )}^{2} - 2 \, {\left (b \sqrt {x} + a\right )} a\right )} \log \left (c\right )}{b}}{2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.12, size = 47, normalized size = 0.89 \begin {gather*} x\,\ln \left (c\,{\left (a+b\,\sqrt {x}\right )}^p\right )-\frac {p\,\left (b^2\,x+2\,a^2\,\ln \left (a+b\,\sqrt {x}\right )-2\,a\,b\,\sqrt {x}\right )}{2\,b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________